<include file="public@header" />
</head>
<body>
	<div class="wrap js-check-wrap">		
		<form class="well form-inline margin-top-20" method="post" action="{:url('Form/orderDetail')}">
		店铺列表：
        <select class="form-control" name="storeid" style="width: 140px;">
        	<option>请选择</option> 
	   	   <foreach name='list_store_list' item='vl' key='kl'>
	       <option value='{$vl.id}'>{$vl.store_name}</option> 
	       </foreach>
   		</select>   
	<!--  促销类型:
       <input type="text" class="form-control" name="rebate" id="rebate" style="width: 120px;" value="" placeholder="">
           套餐类型:
        <input type="text" class="form-control" name="setmealid" id="setmealid" style="width: 120px;" value="" placeholder=""> -->
           订单编号:
        <input type="text" class="form-control" name="orderid" id="orderid" style="width: 120px;" value="" placeholder="">
            商品名称:
        <input type="text" class="form-control" name="goodsname" id="goodsname" style="width: 120px;" value="" placeholder="">          
           付款状态:
        <select class="form-control" name="paystatus" style="width: 140px;">
            <option value='-3'>全部</option>
            <foreach name="pays" item="v" key='k'>
            <option value='{$k}'>{$v}</option>
            </foreach>
        </select> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                           	     
           时间:
        <input type="text" class="form-control js-bootstrap-datetime" name="start_time" id="start_time" value="{$start_time|default=''}" style="width: 140px;" autocomplete="off">-
        <input type="text" class="form-control js-bootstrap-datetime" name="end_time"   id="end_time" value="{$end_time|default=''}" style="width: 140px;" autocomplete="off"> &nbsp; &nbsp;         
        <input type="submit" class="btn btn-primary" value="搜索" />
        <a class="btn btn-danger" href="{:url('Form/orderDetail')}">清空</a>
        <!-- <a title="数据导出" onclick="exportdata()" id="export" class="btn btn-success" style="margin-left: 10px;">数据导出</a> -->
        </form>
		<table class="table table-hover table-bordered">
			<thead>
				<tr>
					<th width="40">ID</th>
					<th align="left">订单号</th>
					<th align="left">商品名称</th>
					<th align="left">规格</th>
					<th align="left">价格</th>
					<th align="left">折扣后价格</th>
					<th align="left">优惠金额</th>
					<th align="left">会员价格</th>
					<th align="left">店铺</th>
					<th align="left">生成时间</th>
					<th align="left">付款状态</th>
					<th align="left">活动类型</th>
					<!-- <th width="160">操作</th> -->
				</tr>
			</thead>
			<tbody>
			<empty name="list">
			<tr><td colspan='12'><span style="text-align:center; width:100%;display:block;font-size:18px;color:red;">*请选择要查看的店铺</span></td></tr>
			<else/>
				<foreach name="list" item="vo">
				<tr>
					<td>{$vo.id}</td>
					<td>{$vo.orderid}</td>
					<if condition="($vo.stemeal == 1)"> 
					<td>{:get_setmeal_data($vo['goodsid'],'set_name')}</td>	
					<elseif condition="$vo.rebateid gt 0"/>
					<td>{:get_rebate_data($vo['goodsid'],'re_name')}</td>				
					<else/> 
					<td>{:get_good_data($vo['goodsid'],'g_goodsname')}</td>
					</if>				
					<!-- <td>{:get_good_data($vo['goodsid'],'g_goodsname')}</td> -->	
					<td>{:format($vo['format'],'format')}</td><!-- 规格 -->
					<td>{$vo.price}</td>
					<td>{$vo.money}</td>
					<td>{$vo.rmb}</td>
					<td>{$vo.vipprice}</td>
					<td>{:get_store_data($vo['storeid'],'store_name')}</td><!-- 店铺 -->
					<td>{$vo.ctime|time_format}</td>
					<td>{$vo.paystatus|get_pay_status}</td>
					<if condition="($vo.stemeal == 1)"> 
					<td>套餐</td>
					<elseif condition="$vo.rebateid gt 0"/>
					<td>促销</td>
					<else/>
					<td>{:get_rebate_data($vo['rebateid'],'re_name')}</td>
					</if>
					<!-- <td>												
						<a class="js-ajax-delete" href="{:url('Form/delete',array('id'=>$vo['id']))}">{:lang('DELETE')}</a>						
					</td> -->
				</tr>
				</foreach>
				</empty>
			</tbody>
		</table>
		<div class="pagination">{$page}</div>
	</div>	
	<script>
function exportdata()
{
	var orderNo=$("#orderNo").val();
	var cardid=$("#cardid").val();
	var starttime=$("#start_time").val();
	var endtime=$("#end_time").val();
	location="./importData?orderNo="+orderNo+"&cardid="+cardid+"&starttime="+starttime+"&endtime="+endtime;
}
</script>  
<script src="__STATIC__/js/admin.js"></script> 
</body>
</html>